//
//  mainl.cpp
//  银行业务模拟
//
//  Created by 孙文轩 on 2021/11/30.
//
#include <iostream>
#include <string>
#include "Header.h"

using namespace std;

//欢迎方法
void welcome()
{

    
    cout << "                    ***---------------------------------------------------------------------***" << endl;
    cout << "                                                                                               " << endl;
    cout << "                                                欢迎来到银行模拟系统                                       " << endl;
    cout << "                                                                                               " << endl;
    cout << "                    ***---------------------------------------------------------------------***" << endl;
    
    
                                
    cout << "                    ===========================================================================" << endl;
    cout << "                    *                                                                         *" << endl;
    cout << "                    *                       如果您确定了时间,就不可以再次修改!                      *" << endl;
    cout << "                    *                                                                         *" << endl;
    cout << "                    *                       如果您想修改营业时间，您可以退出该程序并且重新启动.         *" << endl;
    cout << "                    *                                                                         *" << endl;
    cout << "                    ===========================================================================" << endl;
    

        
}
 
//银行菜单
void bankMenu()
{
    
    cout << "                    ===========================================================================" << endl;
    cout << "                    |                                                                         |" << endl;
    cout << "                    |                          ------银行模拟系统------                         |" << endl;
    cout << "                    |                                                                         |" << endl;
    cout << "                    |                                                                         |" << endl;
    cout << "                    |                         开始模拟系统请输入1                                |" << endl;
    cout << "                    |                         如果结束系统请输入2                                |" << endl;
    cout << "                    ===========================================================================" << endl;
}

//银行菜单方法
void bankStartMenu()
{
    int select = 0;
    
    int open_time;//银行开门时间
    int closed_time;//银行关闭时间
    
    cout << "                                        银行营业时间 (h)：";
    cin >> open_time;//设置银行开始营业时间 （小时）
    cout << endl;
    cout << "                                        银行结束时间 (h): " ;
    cin >> closed_time;//设置银行结束营业时间（小时）
    
    while (select != 2)
    {

        
        bankMenu();//显示银行菜单
        cout << "                              请进入选择：      ";
        cin >> select;//输入选择
        
        switch (select)
        {
            case 1:
            
                startWorking(open_time, closed_time);//开始模拟银行工作
                
                break;
            
            case 2:

                cout << "                                              再见，欢迎您下次光临!                                   " << endl;
                
                break;
            
            default:
                cout << "                              这是无效输入，请您尝试输入1~2，谢谢您  " << endl;
                
                break;
        }
    }
    
    return ;
}

